home *** CD-ROM | disk | FTP | other *** search
-
-
-
- RRRRWWWWGGGGSSSSttttaaaacccckkkk((((3333CCCC++++++++)))) RRRRWWWWGGGGSSSSttttaaaacccckkkk((((3333CCCC++++++++))))
-
-
-
- NNNNaaaammmmeeee
- RWGStack(type) - Rogue Wave library class
-
- SSSSyyyynnnnooooppppssssiiiissss
- #include <rw/gstack.h>
-
-
-
- declare(RWGStack,ttttyyyyppppeeee)
- RWGStack(ttttyyyyppppeeee) a ;
-
-
-
-
- DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
- Class RRRRWWWWGGGGSSSSttttaaaacccckkkk((((ttttyyyyppppeeee)))) represents a group of ordered elements, not
- accessible by an external key. A RRRRWWWWGGGGSSSSttttaaaacccckkkk((((ttttyyyyppppeeee)))) is a last in, first out
- (LIFO) sequential list for which insertions and removals are made at the
- beginning of the list. Hence, the ordering is determined externally by
- the ordering of the insertions. Duplicates are allowed. This class is
- implemented as a singly-linked list. Objects of type RRRRWWWWGGGGSSSSttttaaaacccckkkk((((ttttyyyyppppeeee)))) are
- declared with macros defined in the standard C++ header file <<<<ggggeeeennnneeeerrrriiiicccc....hhhh>>>>.
- In order to find a particular item within the collection, a user-provided
- global "tester" function is required to test for a "match," definable in
- any consistent way. This function should have prototype:
-
- RWBoolean yyyyoooouuuurrrrTTTTeeeesssstttteeeerrrrFFFFuuuunnnnccccttttiiiioooonnnn(const ttttyyyyppppeeee* c, const void* d);
-
-
-
-
-
- The argument cccc is a candidate within the collection to be tested for a
- match. The argument dddd is for your convenience and will be passed to
- yyyyoooouuuurrrrTTTTeeeesssstttteeeerrrrFFFFuuuunnnnccccttttiiiioooonnnn(((()))). The function should return TTTTRRRRUUUUEEEE if a "match" is
- found between cccc and dddd. In order to simplify the documentation below, an
- imaginary typedef
-
- typedef RWBoolean (*yyyyoooouuuurrrrTTTTeeeesssstttteeeerrrr)(const ttttyyyyppppeeee*, const void*);
-
-
-
-
-
- has been used for this tester function.
-
- PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee
- None
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- RRRRWWWWGGGGSSSSttttaaaacccckkkk((((3333CCCC++++++++)))) RRRRWWWWGGGGSSSSttttaaaacccckkkk((((3333CCCC++++++++))))
-
-
-
- Public Constructors
- RRRRWWWWGGGGSSSSttttaaaacccckkkk((((ttttyyyyppppeeee))))();
-
-
- Constructs an empty stack.
-
- RRRRWWWWGGGGSSSSttttaaaacccckkkk((((ttttyyyyppppeeee))))(ttttyyyyppppeeee* a);
-
-
- Constructs a stack with one entry aaaa.
-
- RRRRWWWWGGGGSSSSttttaaaacccckkkk((((ttttyyyyppppeeee))))(const RWGStack(ttttyyyyppppeeee)& a);
-
-
- Copy constructor. A shallow copy of aaaa is made.
-
- AAAAssssssssiiiiggggnnnnmmmmeeeennnntttt OOOOppppeeeerrrraaaattttoooorrrr
- void
- ooooppppeeeerrrraaaattttoooorrrr====(const RWGStack(ttttyyyyppppeeee)& a);
-
-
- Assignment operator. A shallow copy of aaaa is made.
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr FFFFuuuunnnnccccttttiiiioooonnnnssss
- void
- cccclllleeeeaaaarrrr();
-
-
- Removes all items from the stack.
-
- RWBoolean
- ccccoooonnnnttttaaaaiiiinnnnssss(yyyyoooouuuurrrrTTTTeeeesssstttteeeerrrr tttt, const void* d) const;
-
-
- Returns TTTTRRRRUUUUEEEE if the stack contains an item for which the user-defined
- function pointed to by tttt finds a match with dddd.
-
- RWBoolean
- ccccoooonnnnttttaaaaiiiinnnnssssRRRReeeeffffeeeerrrreeeennnncccceeee(const ttttyyyyppppeeee* e) const;
-
-
- Returns TTTTRRRRUUUUEEEE if the stack contains an item with the address eeee....
-
- size_t
- eeeennnnttttrrrriiiieeeessss() const;
-
-
- Returns the number of items in the stack.
-
- RWBoolean
- iiiissssEEEEmmmmppppttttyyyy() const;
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- RRRRWWWWGGGGSSSSttttaaaacccckkkk((((3333CCCC++++++++)))) RRRRWWWWGGGGSSSSttttaaaacccckkkk((((3333CCCC++++++++))))
-
-
-
- Returns TTTTRRRRUUUUEEEE if the stack is empty, otherwise FFFFAAAALLLLSSSSEEEE.
-
- size_t
- ooooccccccccuuuurrrrrrrreeeennnncccceeeessssOOOOffff(yyyyoooouuuurrrrTTTTeeeesssstttteeeerrrr t, const void* d) const;
-
-
- Returns the number of items in the stack for which the user-provided
- function pointed to by tttt finds a match with dddd.
-
- size_t
- ooooccccccccuuuurrrrrrrreeeennnncccceeeessssOOOOffffRRRReeeeffffeeeerrrreeeennnncccceeee(const ttttyyyyppppeeee* e) const;
-
-
- Returns the number of items in the stack with the address eeee....
-
- ttttyyyyppppeeee*
- ppppoooopppp();
-
-
- Removes and returns the item at the top of the stack, or returns nnnniiiillll if
- the stack is empty.
-
- void
- ppppuuuusssshhhh(ttttyyyyppppeeee* a);
-
-
- Adds an item to the top of the stack.
-
- ttttyyyyppppeeee*
- ttttoooopppp() const;
-
-
- Returns the item at the top of the stack or nnnniiiillll if the stack is empty.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-